#include("../../comm/FormHead.html")
<div id="main">
    <div style="margin: 10px">
        <form action="" class="layui-form" lay-filter="form">
            <input type="hidden" name="actions" value="#(form.actions)">
            <input type="hidden" name="emp_id" value="#(user.emp_id)">
            <input type="hidden" id="user_posts" name="user_posts" value="#(user.user_posts)">
            #(token??)
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属部门</label>

                        <div class="layui-input-inline">
                            #(form.select.get("deptid"))
                        </div>
                        <label class="layui-form-mid">用户类型</label>

                        <div class="layui-input-inline">
                            #(form.select.get("usertype"))
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label">登陆帐号</label>

                        <div class="layui-input-inline" style="width:250px">
                            <input type="text" id="login_id" name="login_id" placeholder="请输入帐号"
                                   value="#(user.login_id)" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户姓名</label>

                        <div class="layui-input-block">
                            <input type="text" name="user_name" placeholder="请输入姓名"
                                   value="#(user.user_name)" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label">工作岗位</label>

                        <div class="layui-input-block" id="user_post">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱</label>

                        <div class="layui-input-inline">
                            <input type="text" name="user_email" placeholder="请输入邮箱"
                                   value="#(user.user_email)" class="layui-input">
                        </div>
                        <label class="layui-form-mid">手机号</label>

                        <div class="layui-input-inline">
                            <input type="text" id="user_phone" name="user_phone" placeholder="请输入手机号"
                                   value="#(user.user_phone)" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label">备注</label>

                        <div class="layui-input-block">
                            <textarea name="user_desc" placeholder="" class="layui-textarea" style="height:60px">#(user.user_desc)</textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="Submit1">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<SCRIPT LANGUAGE="JavaScript">
    <!--
    layui.use(['form', 'myTool', 'xmSelect'], function () {
        var form = layui.form, $ = layui.$;

        var userPost = layui.xmSelect.render({
            el: '#user_post', name: 'user_post', paging: false, filterable: false,
            radio: false, clickClose: false, searchTips: '请选择工作岗位',
            data: []
        });
        layui.$.get('getUserPostApi', {val: ''}, function (result) {
            userPost.update({
                data: result.data, autoRow: true, initValue: eval($("#user_posts").val())
            });
        });

        form.on('submit(Submit1)', function (data) {
            layui.myTool.postJson("ModifySystemUserApi", data.field, function () {
                top.layer.closeAll();
            });
            return false;
        });
    });
    //-->
</SCRIPT>
</body>
</html>